Distill Eurostat Article: EU Population over 65

An analysis of the EU’s population that is 65 years or more.

Raquel
2021-01-08

We will use Eurostat’s indicator data for “Proportion of population aged 65 and over” as a case study when working with the data.table R package and apply a few animations using gganimate. The goal is to explore the geographical and time trends for the gender pay gap in the EU and compare Portugal with its countries

We will start by learning how to understand the data and extract it from the Eurostat package within R. We will then process in preparation for some exploratory analysis.*

Objective

The objective is to look at the geographical and time trends in the data. We will answer the following questions:

Understanding the Data

Proportion of population aged 65 and over

% of total population who are aged 65 and over

Source

online data code: TPS00028 Source of data: Eurostat Last data update: 03/07/2020 22:00 (5 months ago) Last structure update: 03/07/2020 Overall data coverage: 2008 — 2019 Number of values: 592

source link: https://ec.europa.eu/eurostat/databrowser/view/tps00028/default/table?lang=en The source dataset for TPS00028 is: DEMO_PJANIND https://ec.europa.eu/eurostat/databrowser/product/view/DEMO_PJANIND

Copyrights: Eurostat Copyright/Licence Policy is applicable.

Loading Libraries

Importing the Data

# A tibble: 1 x 2
  title                                     code    
  <chr>                                     <chr>   
1 Proportion of population aged 65 and over tps00028

Defining variables dat and dat1

dat = Every country in the EU separately dat1 = Portugal vs EU

# A tibble: 2 x 4
  indic_de   geo    time values
  <chr>      <chr> <dbl>  <dbl>
1 PC_Y65_MAX AT     2008   17.1
2 PC_Y65_MAX AT     2009   17.4
# A tibble: 2 x 4
  indic_de   geo        time values
  <chr>      <chr>     <dbl>  <dbl>
1 PC_Y65_MAX EU27_2020  2008   17.3
2 PC_Y65_MAX EU27_2020  2009   17.4
# A tibble: 3 x 4
  indic_de                                        geo      time values
  <chr>                                           <chr>   <dbl>  <dbl>
1 Proportion of population aged 65 years and more Austria  2008   17.1
2 Proportion of population aged 65 years and more Austria  2009   17.4
3 Proportion of population aged 65 years and more Austria  2010   17.6
# A tibble: 3 x 4
  indic_de                       geo                       time values
  <chr>                          <chr>                    <dbl>  <dbl>
1 Proportion of population aged… European Union - 27 cou…  2008   17.3
2 Proportion of population aged… European Union - 27 cou…  2009   17.4
3 Proportion of population aged… European Union - 27 cou…  2010   17.6

Evolution of proportion of the population 65 and over, from 2008 to 2019

…The same line graph, but animated

… in an animated bar chart

Portugal vs. European Union, 2008-2019

in a line graph

… The same line graph, but animated

Then vs Now (bar chart and map)

Now we compare the first and the latest years [2008 vs. 2019] provided in the dataset individually.

Proportion of people 65 and over in 2008

…in a Bar Chart (2008)

Proportion of people 65 and over in 2019

…in a bar chart